package carte;

public class Direction {
	private int dx;
	private int dy;

	public Direction(int dx, int dy) {
		super();
		this.dx = dx;
		this.dy = dy;
	}

	public int getDx() {
		return dx;
	}

	public int getDy() {
		return dy;
	}

	/*
	 * Pour x,y demarrant en 0,0 du coin en haut a gauche de la fenetre
	 * 0 : Bas 1 : Gauche 2 : Haut 3 : Droite
	 */
	public static Direction[] buildAxes(){
		Direction[] axes = new Direction[4];
		//bas
		axes[0] = new Direction(0, 1);
		//gauche
		axes[1] = new Direction(-1, 0);
		//haut
		axes[2] = new Direction(0, -1);
		//droite
		axes[3] = new Direction(1, 0);
		return axes;
	}
}
